import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

const store = new Vuex.Store({
  state: {
    count: 0,
    projectId:'KGO00001CS',
    userInfo:{},
    //RootURL:"http://118.25.239.234:8866",
    RootURL:"http://127.0.0.1:8866",
    //WsURL:"ws://118.25.239.234:8866",
    WsURL:"ws://127.0.0.1:8866",
    sysMessage:[],
    aloneSelect:{},
    aloneTextarea:{}
  },
  mutations: {
    increment (state) {
      state.count++
    },
    /**
     * 更新表单的选择项
     */
    updateSelected (state,message) {
      state.aloneSelect = message;
    },
    updateSysMessage (state,message) {
      state.sysMessage = message;
    },
    /**
     * @param {} state
     * @param {*} message
     */
    updateProjectId (state,message) {
      state.projectId = message;
    },
    updateTextarea (state,message) {
      state.aloneTextarea = message;
    },
    updateUserInfo (state,message) {
      state.userInfo = message;
    }
  },
  getters: {

  }
})
export default store
